package cn.itsource.basic.mapper;

import cn.itsource.basic.query.BaseQuery;

import java.util.List;

public interface BaseMapper <T>{
    void save(T t);

    void delete(Long id);

    void update(T t);

    T loadById(Long id);

    List<T> loadAll();

    //分页用到的方法
    //查询分页总数
    Integer queryCount(BaseQuery query);

    //查询当前页数据
    List<T> queryData(BaseQuery query);

    void batchDelete(List<Long> ids);
}
